package com.alks.common.data.enums.system;

import java.util.HashSet;
import java.util.Set;

/**
 * @author MS
 * @since 2024/6/30下午7:34
 */
public enum LoginIgnoreEnum {
    LTF("林添发","LTF"),
    LTF1("林添发1","LTFHF");

    private String userName;
    private String loginName;

    LoginIgnoreEnum(String userName,String loginName){
        this.userName = userName;
        this.loginName = loginName;
    }

    /*快速校验忽略名单*/
    private static final Set<String> IGNORE_NAME = new HashSet<>();
    static {
        for (LoginIgnoreEnum ignoreEnum : values()) {
            IGNORE_NAME.add(ignoreEnum.loginName);
        }
    }

    /**
     * 快速校验忽略名单
     * @param userName 待校验名单
     * @return 检验结果
     */
    public static boolean IgnoreExist(String userName){
        return IGNORE_NAME.contains(userName);
    }
}
